<template>
	<div class="header">
		<div class="header-left"><div class="iconfont back-icon">&#xe624;</div></div>
		<div class="header-input"><span class="iconfont">&#xe632;</span>输入城市/景点/游玩主题</div>
		<div class="header-right"><router-link to="/city">{{ city }}<span class="iconfont arrow-icon">&#xe64a;</span></router-link></div>
	</div>
</template>

<script>
	import {mapState} from 'vuex'
	export default {
		name: 'Header',
		data() {
			return {
				
			};
		},
		computed: {
			...mapState(['city'])
		},
		mounted() {
			console.log(this.$store.state.city)
		}
	}
</script>

<style lang="less" scoped>
	@import '~styles/varibles.less';
	.header{
		display: flex;
		line-height:@headerHeight;
		background: @bgColor;
		color: #FFFFFF;
		.header-left{
			width:.64rem;
			.back-icon{
				text-align: center;
				font-size: .4rem;
			}
		}
		.header-input{
			flex:1;
			height: .64rem;
			line-height: .64rem;
			margin:.12rem 0 0 .2rem;
			background: #fff;
			border-radius: .1rem;
			color: #ccc;
			padding-left: .2rem;
		}
		.header-right{
			min-width:1.24rem;
			text-align: center;
			padding:0 .1rem;
			.arrow-icon{
				font-size: .24rem;
			}
			a{
				color: #fff;
			}
		}
	}
</style>
